/**
 * <copyright>
 * </copyright>
 *
 * 
 */
package edu.pku.sei.AMT.resource.amtscript.grammar;

/**
 * A class to represent a rules in the grammar.
 */
public class AmtscriptRule extends edu.pku.sei.AMT.resource.amtscript.grammar.AmtscriptSyntaxElement {
	
	private final org.eclipse.emf.ecore.EClass metaclass;
	
	public AmtscriptRule(org.eclipse.emf.ecore.EClass metaclass, edu.pku.sei.AMT.resource.amtscript.grammar.AmtscriptChoice choice, edu.pku.sei.AMT.resource.amtscript.grammar.AmtscriptCardinality cardinality) {
		super(cardinality, new edu.pku.sei.AMT.resource.amtscript.grammar.AmtscriptSyntaxElement[] {choice});
		this.metaclass = metaclass;
	}
	
	public org.eclipse.emf.ecore.EClass getMetaclass() {
		return metaclass;
	}
	
	public edu.pku.sei.AMT.resource.amtscript.grammar.AmtscriptChoice getDefinition() {
		return (edu.pku.sei.AMT.resource.amtscript.grammar.AmtscriptChoice) getChildren()[0];
	}
	
}

